package com.balabala.gym_user.controller.app;

import com.balabala.gym_user.pojo.entity.UserPoints;
import com.balabala.gym_user.pojo.vo.UserPointsQueryVo;
import com.balabala.gym_user.service.UserPointsService;
import com.balabala.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * Author:zl
 * Date:2023/5/9 18:35
 */
@RestController
@RequestMapping("/app/points")
@Slf4j
@CrossOrigin
@Api(tags = "用户积分前台接口")
public class UserPointsController {
    @Autowired
    private UserPointsService userPointsService;


    @PostMapping("/findAll")
    @ApiOperation("查询用户全部积分情况")
    public Result findAll(@RequestParam Long userId) {
        UserPointsQueryVo all = userPointsService.findAll(userId);
        return Result.ok(all);
    }


}
